<template>
	<div class="layout-main">
		<div class="section">
			<div class="bread-btns">
				<el-button @click="copy">备份</el-button>
				<el-button @click="reset">恢复</el-button>
			</div>
			<el-table border :data="tableData.data" style="width: 100%">	
				<el-table-column :resizable='isBorder' label="名称" prop="update"></el-table-column>
				<el-table-column :resizable='isBorder' label="原始ID" prop="update"></el-table-column>
				<el-table-column :resizable='isBorder' label="APPID" prop="update"></el-table-column>
				<el-table-column :resizable='isBorder' width='150' label="状态" prop="update"></el-table-column>
				<el-table-column :resizable='isBorder' label="操作" width="200">
					<template slot-scope="scope">
						<a href="javascript:;" @click.prevent="check(scope.row.id)"><i class="iconfont icon-anquanjianchaoff" style="font-size: 26px;"></i></a>
						<a href="javascript:;" @click.prevent="del(scope.row.id)"><i class="iconfont icon-shanchu"></i></a>
					</template>
				</el-table-column>		
			</el-table>
		</div>

		<!-- 取消提案 -->
		<layer :data="cencalLayer" @on-ok="cancelApplyLayer"></layer>
	</div>
</template>
<script>	
	import { TreeToArray } from '@/utils'
	import '@/assets/less/modules/switch.less'
	export default {
		data() {
			return {
				isBorder: false,
				superiorUser: [],
				cencalLayer: {
					title: '取消提案',
					show: false,
					tips: '确定取消提案？'
				},
				tableData:{
					data:[{
						src: 'https://shared-https.ydstatic.com/dict/v2016/result/logo.png',
						id:1,
						name:'震惊!中兴或失去谷歌的Android系统授权',
						update: '2018-4-20  20:07:49'
					}]
				}
			}
		},
		mounted() {
			this.$store.commit('breadData', {
				pageName:'微信开发平台设置',				
				list:[
					{
						name: '项目列表'
					}
				]
			})
		},		
		methods: {
			check() {
				
			},
			del() {

			},
			// 弹窗-提案申请
			showApplyLayer(id) {	
				this.applyInfo.data = {}
				this.applyInfo.data.id = id
				this.applyInfo.show = true

				this.roleForm = {}
				this.targetForm = {}
				this.superiorUser = []				
			},			
			// 取消提案
			showCancelApplyLayer(id) {
				this.cencalLayer.show = true
				this.clueId = id
			},
			cancelApplyLayer(id) {
				api.cancelClue({ id: this.clueId }).then(res => {
					if (res == 'success') {
						this.$msg({ message: '取消提案成功', type: 'success' })
						this.sumbitSave()
						this.cencalLayer.show = false
						this.$store.dispatch('getUnProcess')
					}
				}).catch(res => {
					console.log(res)
				})
			}

		}
	}
</script>